import http from '@/common/js/httpRequest'
//获取部门列表
export function getDepartmentList (params) {
  return http({
    method: 'get',
    url: '/api/sys/department/list',
    params
  })
}
//新增或修改部门
export function saveOrUpdateDepartment (data) {
	const url = !data.departmentId ? '/api/sys/department/save' : '/api/sys/department/update'
  return http({
    method: 'post',
    url: url,
    data
  })
}
//删除部门
export function deleteDepartment (ids) {
  return http({
    method: 'post',
    url: '/api/sys/department/delete',
    data: ids,
    openDefultdata: true
  })
}